export const request = async (url: string, data?: any) => {
  const res: any = await new Promise((reslove, reject) => {
    wx.request({
      url:
        "http://localhost:8080" +
        url,
      data,
      method: "POST",
      success: (res) => {
        reslove(res);
      },
      fail: (err) => {
        console.log(err)
        reject(err);
      },
    });
  });
  return res.data
};
